#!/bin/bash
export NDK=/mnt/nas/work/make/ffmpeg/android/ffmpeg/android-ndk-r21e # 这里需要替换成你本地的 NDK 路径，其他的不用修改
TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
export API=21
PREFIX=$(pwd)/android/arm64-v8a
my_host=aarch64-linux-android
export TARGET=aarch64-linux-android
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
CROSS_PREFIX=$TOOLCHAIN/bin/aarch64-linux-android-
cd x264/
./configure \
--prefix=$PREFIX \
--disable-cli \
--enable-shared \
--enable-pic \
--host=$my_host \
--cross-prefix=$CROSS_PREFIX \
--sysroot=$NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot \

make clean
make -j8
make install


































